package org.tuoren.official.domain.bo;

import org.tuoren.common.core.validate.AddGroup;
import org.tuoren.common.core.validate.EditGroup;
import org.tuoren.official.domain.Product;
import org.tuoren.common.mybatis.core.domain.BaseEntity;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import lombok.EqualsAndHashCode;
import jakarta.validation.constraints.*;

import java.util.List;

/**
 * 产品信息业务对象 t_product
 *
 * @author wl
 * @date 2024-11-26
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = Product.class, reverseConvertGenerate = false)
public class ProductBo extends BaseEntity {

    /**
     *
     */
    @NotNull(message = "不能为空", groups = { EditGroup.class })
    private Long id;

    /**
     * 产品名称
     */
    @NotBlank(message = "产品名称不能为空", groups = { AddGroup.class, EditGroup.class })
    private String name;

    /**
     * 所属产品线
     */
    @NotNull(message = "所属产品线不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long typeId;

    /**
     * 一句话简介
     */
    //@NotBlank(message = "一句话简介不能为空", groups = { AddGroup.class, EditGroup.class })
    private String summary;

    /**
     * 规格
     */
    //@NotBlank(message = "规格不能为空", groups = { AddGroup.class, EditGroup.class })
    private String spec;

    /**
     * 型号
     */
    //@NotBlank(message = "型号不能为空", groups = { AddGroup.class, EditGroup.class })
    private String model;

    /**
     * 产品介绍
     */
    //@NotBlank(message = "产品介绍不能为空", groups = { AddGroup.class, EditGroup.class })
    private String describes;

    /**
     * 产品图片URL
     */
    //@NotBlank(message = "产品图片URL不能为空", groups = { AddGroup.class, EditGroup.class })
    private String photoUrl;
    /**
     * 显示顺序
     */
    private Integer orderNum;
    /**
     * 所属科室，多个科室以逗号分隔
     */
    @NotBlank(message = "所属科室，多个科室以逗号分隔不能为空", groups = { AddGroup.class, EditGroup.class })
    private String departmentId;
    private List<String> departmentList;


}
